<template>
	<view>
		<view class="index-search" :style="{paddingTop:top}">
		
			<view @click.native='clickBack' :style="{display:'flex',justifyContent:'center',alignItems:'center',width:'100%',height:height}">返回</view>
		</view>
		<map style="width: 1000px; height: 800px;":longitude="longitude":latitude="latitude" ></map>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				top:"0px",
				height:"0px",
				longitude:0,
				latitude:0
				
			};
		},
		
		onLoad(){
			uni.getLocation({
				success:  (res) =>{
				this.longitude= res.longitude;
				this.latitude= res.latitude;
				}
			});
		},
		methods: {
			clickBack(){
				uni.navigateBack({});
			}
		},
		created() {
			// 头部胶囊布局
			  let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
			  this.top=menuButtonInfo.top+'px'
			  this.height=menuButtonInfo.height+'px'
			  
			
		},
		
	}
</script>

<style scoped lang="less">
@base:#2B3082;
	.index-search{
		padding-top: 0;
		background-color:@base ;
		color:#FFFFFF;
		height:50px;
		
	}
</style>
